# import os
# ret = os.walk(r"C:\Users\朱蒙蒙\Desktop\git\daydayup")
# sum_size = 0
# for base_path,dir_list,file_list in ret:
#     for file_name in file_list:
#         size = os.path.getsize(os.path.join(base_path,file_name))
#         sum_size += size
# print(sum_size)


# import hashlib
# import os
#
# path1 = r"F:\000.车身修复\000.车身修复\B2\视频\车身模拟板件更换视频\2-9-焊接施工作业完成.mp4"
# path2 = r"F:\000.车身修复\000.车身修复\B2\视频\车身模拟板件更换视频\has.mp4"
#
# def func(path_name):
#     md5 = hashlib.md5()
#     size = os.path.getsize(path_name)
#     with open(path_name,mode="rb") as f:
#         while size > 1024:
#             read_size = f.read(1024)
#             md5.update(read_size)
#             size -= 1024
#         else:
#             read_size = f.read(size)
#             md5.update(read_size)
#             size = 0
#
#         # while size>0:
#         #     read_size = f.read(1024)
#         #     md5.update(read_size)
#         #     size -= 1024
#     return md5.hexdigest()
# print("开始")
# print(func(path1)==func(path2))
# print("结束")

# menu = {
#     '北京': {
#         '海淀': {
#             '五道口': {
#                 'soho': {},
#                 '网易': {},
#                 'google': {}
#             },
#             '中关村': {
#                 '爱奇艺': {},
#                 '汽车之家': {},
#                 'youku': {},
#             },
#             '上地': {
#                 '百度': {},
#             },
#         },
#         '昌平': {
#             '沙河': {
#                 '老男孩': {},
#                 '北航': {},
#             },
#             '天通苑': {},
#             '回龙观': {},
#         },
#         '朝阳': {},
#         '东城': {},
#     },
#     '上海': {
#         '闵行': {
#             "人民广场": {
#                 '炸鸡店': {}
#             }
#         },
#         '闸北': {
#             '火车战': {
#                 '携程': {}
#             }
#         },
#         '浦东': {},
#     },
#     '山东': {},
# }

# lst = [menu]
# print(lst)
# while lst:
#     for key in lst[-1]:
#         print(key)
#     inp = input("请输入》》》")
#     if inp.upper() == "Q":
#         break
#     elif inp.upper() == "B":
#         lst.pop()
#     elif lst[-1].get(inp):
#         lst.append(lst[-1][inp])

# 文件夹中大小
# import os
# lst = [r"C:\Users\朱蒙蒙\Desktop\git\daydayup"]
# size = 0
# while lst:
#     path = lst.pop()
#     name_lst = os.listdir(path)
#     for name in name_lst:
#         full_path = os.path.join(path,name)
#         if os.path.isdir(full_path):
#             lst.append(full_path)
#         elif os.path.isfile(full_path):
#             size += os.path.getsize(full_path)
# print(size)
#

# import re

# re.finditer()
# re.findall()
# re.search()
# re.match()
# re.compile()  直接编译正则表达式









